<?
class My_View_Helper_LanguageLink
{
    public $view;

    public function setView(Zend_View_Interface $view)
    {
        $this->view = $view;
    }

   public function languageLink(){
   		$c = $this->view->controller;
		$a = $this->view->action;
		$lang = Zend_Registry::get('lang');
		$link = '';
		if($lang == 'en'){
			$link = '<img src="' . $this->view->baseUrl . '/images/mk.png" width="25" height="13" />&nbsp';
			$link .= '<a href="' . $this->view->url(array('language' => 'mk', 'controller'=>$c, 'action' => $a), 'default', true) . $this->view->query .
			 '">Македонски</a>';
		}else{
			$link = '<img src="' . $this->view->baseUrl . '/images/gb.png" width="25" height="13" />&nbsp';
			$link .= '<a href="' . $this->view->url(array('language' => 'en', 'controller'=>$c, 'action' => $a), 'default', true) .$this->view->query .
			 '">English</a>';
		}
		return $link;
	}
}